// import XtxSkeleton from './xtx-skeleton.vue'
// import XtxCarousel from './xtx-carousel.vue'
// import XtxMore from './xtx-more.vue'
// import XtxBread from './xtx-bread.vue'
// import XtxBreadItem from './xtx-bread-item.vue'
import { Message } from './Message'
import confirm from './confirm'
const req = require.context('./', false, /\.vue$/)
// console.log(req.keys())
export default {
  install (app) {
    req.keys().forEach(item => {
      // console.log(item)
      const res = req(item)
      // console.log(res)
      app.component(res.default.name, res.default)
    })
    // 在原型上挂载方法 config.globalProperties原型
    app.config.globalProperties.$message = Message
    app.config.globalProperties.$confirm = confirm
    // app.component(XtxSkeleton.name, XtxSkeleton)
    // app.component(XtxCarousel.name, XtxCarousel)
    // app.component(XtxMore.name, XtxMore)
    // app.component(XtxBread.name, XtxBread)
    // app.component(XtxBreadItem.name, XtxBreadItem)
  }
}
